There is no point in attaching and then committing the same buffer if
there was no damage. This will also make us do less unnecessary backfill
read backs, for the cases where we paint with an empty paint region.
https://bugzilla.gnome.org/show_bug.cgi?id=762120
cairo_rectangle_int_t rect;
int i, n;
- if (!window->current_paint.use_gl)
+ if (!window->current_paint.use_gl &&
+ !cairo_region_is_empty (window->current_paint.region))
{
gdk_wayland_window_attach_image (window);
{
cairo_region_get_rectangle (window->current_paint.region, i, &rect);
wl_surface_damage (impl->display_server.wl_surface, rect.x, rect.y, rect.width, rect.height);
- impl->pending_commit = TRUE;
}
+
+ impl->pending_commit = TRUE;
}
}